package cn.itcast.scm.service.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.itcast.scm.dao.DeptMapper;
import cn.itcast.scm.entity.Dept;
import cn.itcast.scm.service.DeptService;

@Service("deptService")
public class DeptServiceImpl implements DeptService{

	@Autowired
	private DeptMapper deptMapper;
	
	@Override
	public Dept selectDept(Integer deptId) {
		return deptMapper.selectDept(deptId);
	}

	@Override
	public int insertDept(Dept dept) throws Exception{
		int i = 0;
		i = deptMapper.insertDept(dept);
		return i;
	}

}
